<script setup lang="ts">
import { ref, onMounted } from 'vue'

const platform = ref('')
const nodeVersion = ref('')
const chromeVersion = ref('')
const electronVersion = ref('')


onMounted(async () => {
  if (window.electronAPI) {
    platform.value = await window.electronAPI.getPlatform()
    nodeVersion.value = window.electronAPI.nodeVersion()
    chromeVersion.value = window.electronAPI.chromeVersion()
    electronVersion.value = window.electronAPI.electronVersion()
  }
})
</script>

<template>
  <div>
    <p>当前操作系统：{{ platform }}</p>
    <p>本应用正在使用 Chrome (v{{ chromeVersion }}), Node.js (v{{ nodeVersion }}), 和 Electron (v{{ electronVersion }})</p>
  </div>
</template>

<style scoped lang="scss">

</style>